<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:p="http://primefaces.org/ui" template="pages/template/layout.xhtml">
	
	<ui:define name="cssStyle">
	.ui-messages-error, .ui-message-error{
		width:240px;
	}
	</ui:define>
		<ui:define name="content">
			<h:form>				  
				<p:panel id="divLogin" style="width:285px;border:0px;">
					
					<h1 class="titulo-h1">Faça seu login</h1>
					
					<h:panelGrid columns="2">
						<h:outputText value="Login: " />
						<p:inputText id="login" required="true" requiredMessage="Entre com seu login..." value="#{usuarioMB.usuario.login}" />
	
						<h:outputText value="Senha: " />
						<p:password id="senha" value="#{usuarioMB.usuario.senha}" />
	
						<p:spacer height="10"></p:spacer><p:spacer height="10"></p:spacer>
						
						<p:commandButton update="divLogin" action="#{loginMB.efetuarLogin(usuarioMB.usuario)}" value="Entrar" />
						<p:spacer height="15" width="100" />
					</h:panelGrid>
					<p:spacer height="10" />
					<p:message for="login">
						<p:growl globalOnly="true" showDetail="true" autoUpdate="true" />
					</p:message>
					
			</p:panel>
		</h:form>
	
	</ui:define>

</ui:composition>